import json
import torch
from tqdm import tqdm
with open('poi_emb_1ep_gcl.json', 'r', encoding='utf-8') as f:
    poi_emb = json.load(f)

print("start")
emb_list = []
with open("graph_node_id2idx.txt", "r") as f:
    for line in f:
        columns = line.strip().split(",")
        emb_list.append(poi_emb[columns[0]])

# print(len(emb_list))
# print(len(emb_list[0]))
emb_token_tensor = torch.tensor(emb_list)
torch.save(emb_token_tensor, "emb_token_tensor_1ep_gcl.pt")